public class Main {
	public static void main(String[] args) {
		int count = 0;
		for(int i = 1 ; i < Math.pow(2023,2023) ; i++){
			if(panduan(2023,i)){
				count++;
			}
		}
		double result = count % (Math.pow(10,9)+7);
		System.out.print(result);
	}
	public static int qiuyu(int a , int b){
		if(b == 0){
			return a;
		}
		return qiuyu(b , a % b);
	}
	public static boolean panduan(int a , int b){
		return qiuyu(a, b) == 1;
	}
}